/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.clicarros.dao.Implementacao;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Bruno
 */
public class Util {
    
   protected static Connection conexao;
    public static Connection conexao() throws Exception {
        //definicao do driver de conexao
        Class.forName("org.postgresql.Driver");
        //conexao com o bd no postgres
        conexao = DriverManager.getConnection("jdbc:postgresql://localhost:5432/PFC","postgres","59194");
    return conexao;
    }

    public static void fecharconexao() throws Exception {
        conexao.close();
    }
}